<script>
import Cookies from 'js-cookie';
import { accessToAllNonProvincialSchoolsApi } from '@/api/bys/gxjyl/jyqx';
import { acquireMajorApi, departmentApi, dynamicListApi, getHistoryDataApi, getQueryFormApi, getTimeListApi } from '@/api/hardshipSupport/stats';
import moment from 'moment';
import XLSX from 'xlsx';
import { saveAs } from 'file-saver';
import TableV2 from '@/views/xboot-components/table/table-v2.vue';
import { statisticsCategoryApi, statisticsCheckApi, statisticsImplementApi } from '../../api/hardshipSupport/stats';
import cloneDeep from 'lodash/cloneDeep'
export default {
    components: { TableV2 },
    data() {
        return {
            loading:false,
            // 当前角色的名称
            roles: '',
            tableData: [],
            columnsOne:[],
            columnsOne_1: Object.freeze([
                {
                    title: '各高校落实率',
                    align: 'center',
                    key: 'name',
                    width: 200
                },
                {
                    title: '脱贫家庭学生',
                    align: 'center',
                    children: [
                        {
                            title: '总人数',
                            align: 'center',
                            key: 'povertyStrickenTotal',
                            width: 80
                        },
                        {
                            title: '已落实',
                            align: 'center',
                            key: 'povertyStrickenImplemented',
                            width: 80
                        },
                        {
                            title: '落实率',
                            align: 'center',
                            key: 'povertyStrickenRate',
                            width: 80,
                            render(h, params) {
                                return h('p', params.row.povertyStrickenRate + '%');
                            }
                        }
                    ]
                },
                {
                    title: '脱贫不稳定学生',
                    align: 'center',
                    children: [
                        {
                            title: '总人数',
                            align: 'center',
                            key: 'instabilityStrickenTotal',
                            width: 80
                        },
                        {
                            title: '已落实',
                            align: 'center',
                            key: 'instabilityStrickenImplemented',
                            width: 80
                        },
                        {
                            title: '落实率',
                            align: 'center',
                            key: 'instabilityStrickenRate',
                            width: 80,
                            render(h, params) {
                                return h('p', params.row.instabilityStrickenRate + '%');
                            }
                        }
                    ]
                },
                {
                    title: '边缘易致贫学生',
                    align: 'center',
                    children: [
                        {
                            title: '总人数',
                            align: 'center',
                            key: 'edgeStrickenTotal',
                            width: 80
                        },
                        {
                            title: '已落实',
                            align: 'center',
                            key: 'edgeStrickenImplemented',
                            width: 80
                        },
                        {
                            title: '落实率',
                            align: 'center',
                            key: 'edgeStrickenRate',
                            width: 80,
                            render(h, params) {
                                return h('p', params.row.edgeStrickenRate + '%');
                            }
                        }
                    ]
                },
                {
                    title: '突发严重困难学生',
                    align: 'center',
                    children: [
                        {
                            title: '总人数',
                            align: 'center',
                            key: 'suddenSeverityStrickenTotal',
                            width: 80
                        },
                        {
                            title: '已落实',
                            align: 'center',
                            key: 'suddenSeverityStrickenImplemented',
                            width: 80
                        },
                        {
                            title: '落实率',
                            align: 'center',
                            key: 'suddenSeverityStrickenRate',
                            width: 80,
                            render(h, params) {
                                return h('p', params.row.suddenSeverityStrickenRate + '%');
                            }
                        }
                    ]
                },
                {
                    title: '城乡低保学生',
                    align: 'center',
                    children: [
                        {
                            title: '总人数',
                            align: 'center',
                            key: 'citySubsistenceAllowancesTotal',
                            width: 80
                        },
                        {
                            title: '已落实',
                            align: 'center',
                            key: 'citySubsistenceAllowancesImplemented',
                            width: 80
                        },
                        {
                            title: '落实率',
                            align: 'center',
                            key: 'citySubsistenceAllowancesRate',
                            width: 80,
                            render(h, params) {
                                return h('p', params.row.citySubsistenceAllowancesRate + '%');
                            }
                        }
                    ]
                },
                {
                    title: '特困救助学生',
                    align: 'center',
                    children: [
                        {
                            title: '总人数',
                            align: 'center',
                            key: 'extremePovertyTotal',
                            width: 80
                        },
                        {
                            title: '已落实',
                            align: 'center',
                            key: 'extremePovertyImplemented',
                            width: 80
                        },
                        {
                            title: '落实率',
                            align: 'center',
                            key: 'extremePovertyRate',
                            width: 80,
                            render(h, params) {
                                return h('p', params.row.extremePovertyRate + '%');
                            }
                        }
                    ]
                },
                {
                    title: '孤儿学生',
                    align: 'center',
                    children: [
                        {
                            title: '总人数',
                            align: 'center',
                            key: 'orphanTotal',
                            width: 80
                        },
                        {
                            title: '已落实',
                            align: 'center',
                            key: 'orphanImplemented',
                            width: 80
                        },
                        {
                            title: '落实率',
                            align: 'center',
                            key: 'orphanRate',
                            width: 80,
                            render(h, params) {
                                return h('p', params.row.orphanRate + '%');
                            }
                        }
                    ]
                },
                {
                    title: '残疾学生',
                    align: 'center',
                    children: [
                        {
                            title: '总人数',
                            align: 'center',
                            key: 'disabilityTotal',
                            width: 80
                        },
                        {
                            title: '已落实',
                            align: 'center',
                            key: 'disabilityImplemented',
                            width: 80
                        },
                        {
                            title: '落实率',
                            align: 'center',
                            key: 'disabilityRate',
                            width: 80,
                            render(h, params) {
                                return h('p', params.row.disabilityRate + '%');
                            }
                        }
                    ]
                },
                {
                    title: '事实无人抚养',
                    align: 'center',
                    children: [
                        {
                            title: '总人数',
                            align: 'center',
                            key: 'unsupportedTotal',
                            width: 80
                        },
                        {
                            title: '已落实',
                            align: 'center',
                            key: 'unsupportedImplemented',
                            width: 80
                        },
                        {
                            title: '落实率',
                            align: 'center',
                            key: 'unsupportedRate',
                            width: 80,
                            render(h, params) {
                                return h('p', params.row.unsupportedRate + '%');
                            }
                        }
                    ]
                },
                {
                    title: '低保边缘家庭学生',
                    align: 'center',
                    children: [
                        {
                            title: '总人数',
                            align: 'center',
                            key: 'borderlineHomeTotal',
                            width: 80
                        },
                        {
                            title: '已落实',
                            align: 'center',
                            key: 'borderlineHomeImplemented',
                            width: 80
                        },
                        {
                            title: '落实率',
                            align: 'center',
                            key: 'borderlineHomeRate',
                            width: 80,
                            render(h, params) {
                                return h('p', params.row.borderlineHomeRate + '%');
                            }
                        }
                    ]
                },
                {
                    title: '支出型困难家庭学生',
                    align: 'center',
                    children: [
                        {
                            title: '总人数',
                            align: 'center',
                            key: 'studentsPoorFamiliesTotal',
                            width: 80
                        },
                        {
                            title: '已落实',
                            align: 'center',
                            key: 'studentsPoorFamiliesImplemented',
                            width: 80
                        },
                        {
                            title: '落实率',
                            align: 'center',
                            key: 'studentsPoorFamiliesRate',
                            width: 80,
                            render(h, params) {
                                return h('p', params.row.studentsPoorFamiliesRate + '%');
                            }
                        }
                    ]
                },
                {
                    title: '其他低收入家庭学生',
                    align: 'center',
                    children: [
                        {
                            title: '总人数',
                            align: 'center',
                            key: 'otherLowIncomeTotal',
                            width: 80
                        },
                        {
                            title: '已落实',
                            align: 'center',
                            key: 'otherLowIncomeImplemented',
                            width: 80
                        },
                        {
                            title: '落实率',
                            align: 'center',
                            key: 'otherLowIncomeRate',
                            width: 80,
                            render(h, params) {
                                return h('p', params.row.otherLowIncomeRate + '%');
                            }
                        }
                    ]
                },
                {
                    title: '其他',
                    align: 'center',
                    children: [
                        {
                            title: '总人数',
                            align: 'center',
                            key: 'otherTotal',
                            width: 80
                        },
                        {
                            title: '已落实',
                            align: 'center',
                            key: 'otherImplemented',
                            width: 80
                        },
                        {
                            title: '落实率',
                            align: 'center',
                            key: 'otherRate',
                            width: 80,
                            render(h, params) {
                                return h('p', params.row.otherRate + '%');
                            }
                        }
                    ]
                },
                {
                    title: '总计',
                    align: 'center',
                    children: [
                        {
                            title: '总人数',
                            align: 'center',
                            key: 'allTotal',
                            width: 80
                        },
                        {
                            title: '已落实',
                            align: 'center',
                            key: 'allImplemented',
                            width: 80
                        },
                        {
                            title: '落实率',
                            align: 'center',
                            key: 'allRate',
                            width: 80,
                            render(h, params) {
                                return h('p', params.row.allRate + '%');
                            }
                        }
                    ]
                }
            ]),
            columnsTwo:[],
          columnsTwo_1: Object.freeze([
                {
                    title: '各高校帮扶类别',
                    align: 'center',
                    key: 'name',
                    width: 200
                },
                {
                    title: '脱贫家庭学生',
                    align: 'center',
                    children: [
                        {
                            title: '已标记',
                            align: 'center',
                            key: 'povertyStrickenMark',
                            width: 80
                        },
                        {
                            title: '未标记',
                            align: 'center',
                            key: 'povertyStrickenUnMark',
                            width: 80
                        }
                    ]
                },
                {
                    title: '脱贫不稳定学生',
                    align: 'center',
                    children: [
                        {
                            title: '已标记',
                            align: 'center',
                            key: 'instabilityStrickenMark',
                            width: 80
                        },
                        {
                            title: '未标记',
                            align: 'center',
                            key: 'instabilityStrickenUnMark',
                            width: 80
                        }
                    ]
                },
                {
                    title: '边缘易致贫学生',
                    align: 'center',
                    children: [
                        {
                            title: '已标记',
                            align: 'center',
                            key: 'edgeStrickenMark',
                            width: 80
                        },
                        {
                            title: '未标记',
                            align: 'center',
                            key: 'edgeStrickenUnMark',
                            width: 80
                        }
                    ]
                },
                {
                    title: '突发严重困难学生',
                    align: 'center',
                    children: [
                        {
                            title: '已标记',
                            align: 'center',
                            key: 'suddenSeverityStrickenMark',
                            width: 80
                        },
                        {
                            title: '未标记',
                            align: 'center',
                            key: 'suddenSeverityStrickenUnMark',
                            width: 80
                        }
                    ]
                },
                {
                    title: '城乡低保学生',
                    align: 'center',
                    children: [
                        {
                            title: '已标记',
                            align: 'center',
                            key: 'citySubsistenceAllowancesMark',
                            width: 80
                        },
                        {
                            title: '未标记',
                            align: 'center',
                            key: 'citySubsistenceAllowancesUnMark',
                            width: 80
                        }
                    ]
                },
                {
                    title: '特困救助学生',
                    align: 'center',
                    children: [
                        {
                            title: '已标记',
                            align: 'center',
                            key: 'extremePovertyMark',
                            width: 80
                        },
                        {
                            title: '未标记',
                            align: 'center',
                            key: 'extremePovertyUnMark',
                            width: 80
                        }
                    ]
                },
                {
                    title: '孤儿学生',
                    align: 'center',
                    children: [
                        {
                            title: '已标记',
                            align: 'center',
                            key: 'orphanMark',
                            width: 80
                        },
                        {
                            title: '未标记',
                            align: 'center',
                            key: 'orphanUnMark',
                            width: 80
                        }
                    ]
                },
                {
                    title: '残疾学生',
                    align: 'center',
                    children: [
                        {
                            title: '已标记',
                            align: 'center',
                            key: 'disabilityMark',
                            width: 80
                        },
                        {
                            title: '未标记',
                            align: 'center',
                            key: 'disabilityUnMark',
                            width: 80
                        }
                    ]
                },
                {
                    title: '事实无人抚养',
                    align: 'center',
                    children: [
                        {
                            title: '已标记',
                            align: 'center',
                            key: 'unsupportedMark',
                            width: 80
                        },
                        {
                            title: '未标记',
                            align: 'center',
                            key: 'unsupportedUnMark',
                            width: 80
                        }
                    ]
                },
                {
                    title: '低保边缘家庭学生',
                    align: 'center',
                    children: [
                        {
                            title: '已标记',
                            align: 'center',
                            key: 'borderlineHomeMark',
                            width: 80
                        },
                        {
                            title: '未标记',
                            align: 'center',
                            key: 'borderlineHomeUnMark',
                            width: 80
                        }
                    ]
                },
                {
                    title: '支出型困难家庭学生',
                    align: 'center',
                    children: [
                        {
                            title: '总人数',
                            align: 'center',
                            key: 'studentsPoorFamiliesMark',
                            width: 80
                        },
                        {
                            title: '已落实',
                            align: 'center',
                            key: 'studentsPoorFamiliesUnMark',
                            width: 80
                        }
                    ]
                },
                {
                    title: '其他低收入家庭学生',
                    align: 'center',
                    children: [
                        {
                            title: '已落实',
                            align: 'center',
                            key: 'otherLowIncomeMark',
                            width: 80
                        },
                        {
                            title: '未标记',
                            align: 'center',
                            key: 'otherLowIncomeUnMark',
                            width: 80
                        }
                    ]
                },
                {
                    title: '台账总数',
                    align: 'center',
                    key: 'total',
                    width: 100
                }
            ]),
            columnsThree:[],
          columnsThree_1: Object.freeze([
                {
                    title: '各高校帮扶核验情况',
                    align: 'center',
                    key: 'name'
                },
                {
                    title: '困难类型标记不一致',
                    align: 'center',
                    children: [{ title: '总人数', align: 'center', key: 'typeTags' }]
                },
                {
                    title: '延迟毕业学生',
                    align: 'center',
                    children: [{ title: '总人数', align: 'center', key: 'delay' }]
                },
                {
                    title: '退学学生',
                    align: 'center',
                    children: [{ title: '总人数', align: 'center', key: 'dropped' }]
                },
                {
                    title: '休学学生',
                    align: 'center',
                    children: [{ title: '总人数', align: 'center', key: 'suspension' }]
                },
                {
                    title: '非困难群体毕业生',
                    align: 'center',
                    children: [{ title: '总人数', align: 'center', key: 'disadvantagedGroups' }]
                },
                {
                    title: '其他',
                    align: 'center',
                    children: [{ title: '总人数', align: 'center', key: 'other' }]
                }
            ]),
            pages: {
                pageSize: 10,
                pageNumber: 1,
                total: 0
            },
            // 困难帮扶去向落实率 困难帮扶类别统计 困难帮扶数据核对情况统计 1 2 3
            dataType: 1,
            timeList: [],
            // 选定的时间 在加载完timeList后自动选中第一项
            chosenTime: '',
            // 省级选择学校 校级选择所有院系 院系选择所有专业
            departmentList: [],
            chosenDepartment: '',
            resource: '0',
            loading1: false
        };
    },
    beforeDestroy() {
        window.removeEventListener('resize',this.onRestWindow)
    },
    mounted() {

        this.onRestWindow()
        window.addEventListener('resize',this.onRestWindow)


        this.roles = JSON.parse(sessionStorage.getItem('roles'))[0];
        this.chosenDepartment = '0';
        this.dynamicDropDownList();
        // this.getQueryForm();
        this.getTimeListData();
        let today = moment().format('YYYY-MM-DD');
        this.timeList.push(today);
        this.chosenTime = today;
        this.getstatisticsImplement()
    },
    methods: {
        onRestWindow() {
            let tOne = cloneDeep(this.columnsOne_1)
            this.restTreeTableCellWidth(tOne)
            this.columnsOne = tOne
            let tTwo = cloneDeep(this.columnsTwo_1)
            this.restTreeTableCellWidth(tTwo)
            this.columnsTwo = tTwo

            let tThree = cloneDeep(this.columnsThree_1)
            this.restTreeTableCellWidth(tOne)
            this.columnsThree = tThree

        },
        handleSum1({ columns, data }) {
            const sums = {};
            let byrs=0;
            let lsrs=0
            columns.forEach((column, index) => {
                const key = column.key;
                if (index === 0) {
                    sums[key] = {
                        key,
                        value: '合计'
                    };
                    return;
                }
                const values = data.map(item => Number(item[key]));
                if (!values.every(value => isNaN(value))) {
                    const v = values.reduce((prev, curr) => {
                        const value = Number(curr);
                        if (!isNaN(value)) {
                            return prev + curr;
                        } else {
                            return prev;
                        }
                    }, 0);
                    if(column.title==="总人数"){
                        byrs=v;
                    }
                    if(column.title==="已落实"){
                        lsrs=v;
                    }
                    if (column.title==="落实率"){
                        sums[key] = {
                            key,
                            value: byrs === 0 ? '0%' : Math.round((lsrs/byrs) * 10000) / 100 + '%'
                        };
                    }else{
                        sums[key] = {
                            key,
                            value: v
                        };
                    }

                }else {
                    sums[key] = {
                        key,
                        value: ''
                    };
                }
            });

            return sums;
        },
        //导出全部数据
        dropExportAllEMploymentRateOutPut() {
            this.loading1 = true;
            if (this.dataType === 1) {
                this.dropExportAll('困难帮扶去向落实率.xlsx', 'table1');
            }

            if (this.dataType === 2) {
                this.dropExportAll('困难帮扶类别统计.xlsx', 'table2');
            }
            if (this.dataType === 3) {
                this.dropExportAll('困难帮扶数据核对情况统计.xlsx', 'table3');
            }
        },

        //导出全部数据
        dropExportAll(excelName, elementId) {
            // 通过table的id获取表格元素
            const table = document.getElementById(elementId);
            const ws = XLSX.utils.table_to_sheet(table, { raw: true });
            // 设置所有列为字符串格式
            const range = XLSX.utils.decode_range(ws['!ref']);
            for (let column = range.s.c; column <= range.e.c; column++) {
                for (let row = range.s.r; row <= range.e.r; row++) {
                    const cellRef = XLSX.utils.encode_cell({ c: column, r: row });
                    if (!ws[cellRef]) continue;
                    ws[cellRef].z = 's';
                }
            }
            // 确定最后一行的行号
            const lastRowNum = range.e.r;
            // 遍历最后一行的每个单元格并删除它们(最后一行为多余数据，暂无筛选结果)
            for (let colIndex = range.s.c; colIndex <= range.e.c; colIndex++) {
                const cellAddress = XLSX.utils.encode_cell({ c: colIndex, r: lastRowNum });
                if (ws[cellAddress]) {
                    delete ws[cellAddress]; // 删除单元格
                }
            }

            const wb = XLSX.utils.book_new();
            XLSX.utils.book_append_sheet(wb, ws, 'Sheet1');
            const wbout = XLSX.write(wb, { bookType: 'xlsx', type: 'binary' });
            function s2ab(s) {
                const buf = new ArrayBuffer(s.length);
                const view = new Uint8Array(buf);
                for (let i = 0; i !== s.length; ++i) view[i] = s.charCodeAt(i) & 0xff;
                return buf;
            }
            saveAs(new Blob([s2ab(wbout)], { type: 'application/octet-stream' }), excelName);
            this.loading1 = false;
        },
        // 动态下拉列表
        dynamicDropDownList() {
            dynamicListApi().then(res => {
                this.departmentList = res.result || [];
            });
        },
        // 根据查询条件获取表格数据
        getQueryForm() {
            this.loading=true
            let param = {
                name: this.chosenDepartment === '0' ? null : this.chosenDepartment,
                type: this.dataType
            };
            getQueryFormApi(param).then(res => {
                this.tableData = res.result || [];
                this.loading=false
            });
        },
        //查询历史数据
        getHistoryData() {
            this.loading=true
            let param = {
                time: this.chosenTime,
                name: this.chosenDepartment === '0' ? null : this.chosenDepartment,
                type: this.dataType
            };
            getHistoryDataApi(param).then(res => {
                this.tableData = res.result || [];
                this.loading=false
            });
        },
        //      查询时间列表
        getTimeListData() {
            getTimeListApi().then(res => {

                this.timeList = [...this.timeList, ...(res.result || [])];
            });
        },
        // region TODO 困难帮扶去向统计率
        getstatisticsImplement(){
            this.loading=true
            let param = {
                time: this.chosenTime,
                name: this.chosenDepartment === '0' ? null : this.chosenDepartment
            };
            statisticsImplementApi(param).then(res => {
                this.tableData = res.result || [];
                this.loading=false
            });
        },
// region TODO 困难帮扶去向核对情况统计率
        getstatisticsCheck(){
            this.loading=true
            let param = {
                time: this.chosenTime,
                name: this.chosenDepartment === '0' ? null : this.chosenDepartment
            };
            statisticsCheckApi(param).then(res => {
                this.tableData = res.result || [];
                this.loading=false
            })
        },
        // region TODO 困难帮扶类别统计率
        getstatisticsCategory(){
            this.loading=true
            let param = {
                time: this.chosenTime,
                name: this.chosenDepartment === '0' ? null : this.chosenDepartment
            };
            statisticsCategoryApi(param).then(res => {
                this.tableData = res.result || [];
                this.loading=false
            })
        },
        searchClick() {
            if (this.dataType == 1) {
                this.getstatisticsImplement()
            }
            if (this.dataType == 2) {
                this.getstatisticsCategory()
            }

            if (this.dataType == 3) {
                this.getstatisticsCheck()
            }


            // let today = moment().format('YYYY-MM-DD');
            // if (this.chosenTime !== today) {
            //     console.log('111111');
            //     this.getHistoryData();
            // } else {
            //     console.log('2222222');
            //     this.getQueryForm();
            // }
        }
    }
};
</script>

<template>
    <div class="container">
        <div class="d-flex-between-center px-12 head-box" >
            <div class="fs-16 fw-7">困难帮扶台账数据统计</div>
        </div>
        <div class="d-flex-between mt-8 pl-8">
            <div class="d-flex head-selelct">
                <Select v-model="chosenTime" clearable class="select01" >
                    <Option v-for="item in timeList" :value="item">{{ item }}</Option>
                </Select>

                <Select v-model="chosenDepartment" clearable filterable class="select01" >
                    <Option v-if="roles === 'ROLE_PROVINCE'" value="0">所有学校</Option>
                    <Option v-if="roles === 'ROLE_SCHOOL'" value="0">所有学院</Option>
                    <Option v-if="roles === 'ROLE_COLLEGE'" value="0">所有专业</Option>
                    <Option v-for="item in departmentList" :value="item">{{ item }}</Option>
                </Select>

                <Select v-model="dataType" @on-change="searchClick" class="select01" >
                    <Option :value="1">困难帮扶去向落实率</Option>
                    <Option :value="2">困难帮扶类别统计</Option>
                    <Option :value="3">困难帮扶数据核对情况统计</Option>
                </Select>

                <Button type="primary" @click="searchClick">搜索</Button>
            </div>
            <div>
                <Button v-loading="loading1" @click="dropExportAllEMploymentRateOutPut">导出数据表单</Button>
            </div>
        </div>

        <div class="data-table" v-if="dataType === 1">
            <TableV2 id="table1"
                     show-summary
                     border
                     :summary-method="handleSum1"
                     :columns="columnsOne"
                     v-loading="loading"
                     :data="tableData"
                     ref="table1"
                     max-height="700"></TableV2>
        </div>
        <div class="data-table" v-else-if="dataType === 2">
            <TableV2 id="table2"
                     show-summary
                     border
                     :columns="columnsTwo"
                     :data="tableData"
                     v-loading="loading"
                     ref="table2"
                     max-height="700"></TableV2>
        </div>
        <div class="data-table" v-else>
            <TableV2 id="table3"
                     show-summary
                     border
                     :columns="columnsThree"
                     :data="tableData"
                     v-loading="loading"
                     ref="table3"
                     max-height="700"></TableV2>
        </div>
        <!--        <Page-->
        <!--            :total="pages.total"-->
        <!--            :page-size="pages.pageSize"-->
        <!--            :current="pages.pageNumber"-->
        <!--            @on-change="handleChangeCurrentPage"-->
        <!--            @on-page-size-change="handleChangePageSize"-->
        <!--            show-elevator-->
        <!--            show-sizer-->
        <!--            show-total-->
        <!--            class-name="d-flex-center"-->
        <!--            size="small"-->
        <!--        />-->
    </div>
</template>

<style scoped lang="less">
.container {
    height: 100%;
    padding-bottom: 10px;
    background: white;
    font-size: 0.072917rem;
    display: flex;
  flex-direction: column;
    .head-box {
        height: 50px; 
        border-bottom: 1px solid #eef1f7;
    }
    .head-selelct {
        .select01 {
            width: 200px !important;
            margin-right: 10px !important;
        }
    }
    .btns {
        padding: 10px;
        padding-bottom: 0px !important;
        > div {
            margin-right: 10px;
        }
    }
    .data-table {
      flex: 1;
        //height: 95%;
        padding: 10px;
        /deep/.ivu-table-wrapper {
            height: 100% !important;
            max-height: 95% !important;
            @media (max-width: 1440px) {
                .ivu-table-body {
                    max-height: 95% !important;
                    height: 82% !important;
                }
            }
            @media (min-width: 1441px) and (max-width: 1720px) {
              .ivu-table-body {
                max-height: 95% !important;
                height:78% !important;
              }
            }
          @media (min-width: 1721px) and (max-width: 1920px) {
            .ivu-table-body {
              max-height: 95% !important;
              height:77% !important;
            }
          }
            @media (min-width: 1921px) and (max-width: 2560px) {
                .ivu-table-body {
                    max-height: 95% !important;
                    height: 70% !important;
                }
            }
          @media (min-width: 2561px) and (max-width: 3440px) {
            .ivu-table-body {
              max-height: 95% !important;
              height: 60% !important;
            }
          }
          @media (min-width:  3441px) {
            .ivu-table-body {
              max-height: 95% !important;
              height:50% !important;
            }
          }
        }
    }
}
</style>
